import { View, Text, Image } from '@tarojs/components'
import { useLoad } from '@tarojs/taro'
import { HtmlView } from '@/components/taro-html-view'
import { useRequest } from 'ahooks';
import { getVipInfo } from '@/api';

import './index.scss'

export default function Vipprivacy() {

  const { data: { data: vipInfo } = {} } = useRequest(getVipInfo, {})

  useLoad(() => {
    // console.log('Page loaded.')
  })

  return (
    <View className='vipprivacy'>
      <HtmlView previewImage className='level-html' html={vipInfo?.vip_rule || ''} />
      <View className='org-sec'>
        <Text>甲方盖章：{vipInfo?.zhang_name || '成都瑞易宝信息技术有限公司'}</Text>
        <Image className='zhang' src={vipInfo?.zhang_url} mode='aspectFit'></Image>
      </View>
      <View>乙方（电子签名如下）VIP代理商</View>
      <Image src={vipInfo?.sign_file_url} mode='aspectFit'></Image>
      <View className='time'>签约时间：{vipInfo?.pay_time}</View>
    </View>
  )
}
